package com.example.module.goods.form;

import lombok.Data;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.springframework.validation.annotation.Validated;

import java.util.Date;

/**
 * @author ghy
 * @date 2025/08/08
 * @description 商品添加表单
 */
@Data
@Validated
public class GoodsAddForm {
    /**
     * 商品类型ID
     */
    @NotBlank(message = "商品类型ID不能为空")
    private Long goodsTypeId;

    /**
     * 上架用户ID
     */
    private Long userId;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空")
    private String goodsName;

    /**
     * 商品数量
     */
    @NotBlank(message = "商品数量不能为空")
    private String goodsQuantity;

    /**
     * 商品价格
     */
    @NotBlank(message = "商品价格不能为空")
    private String goodsPrice;

    /**
     * 商品状态
     */
    @NotBlank(message = "商品状态不能为空")
    private String goodsState;

    /**
     * 商品上架时间
     */
    private Date goodsUptime;

    /**
     * 商品下架时间
     */
    private Date goodsDowntime;

    /*
     * 商品图片URL
     * */
    private String goodsImageUrl;

    /*
    * Getter and Setter
    * */

    public @NotBlank(message = "商品类型ID不能为空") Long getGoodsTypeId() {
        return goodsTypeId;
    }

    public void setGoodsTypeId(@NotBlank(message = "商品类型ID不能为空") Long goodsTypeId) {
        this.goodsTypeId = goodsTypeId;
    }

    public @NotBlank(message = "上架用户ID不能为空") Long getUserId() {
        return userId;
    }

    public void setUserId(@NotBlank(message = "上架用户ID不能为空") Long userId) {
        this.userId = userId;
    }

    public @NotBlank(message = "商品名称不能为空") String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(@NotBlank(message = "商品名称不能为空") String goodsName) {
        this.goodsName = goodsName;
    }

    public @NotBlank(message = "商品数量不能为空") String getGoodsQuantity() {
        return goodsQuantity;
    }

    public void setGoodsQuantity(@NotBlank(message = "商品数量不能为空") String goodsQuantity) {
        this.goodsQuantity = goodsQuantity;
    }

    public @NotBlank(message = "商品价格不能为空") String getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(@NotBlank(message = "商品价格不能为空") String goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public @NotBlank(message = "商品状态不能为空") String getGoodsState() {
        return goodsState;
    }

    public void setGoodsState(@NotBlank(message = "商品状态不能为空") String goodsState) {
        this.goodsState = goodsState;
    }

    public Date getGoodsUptime() {
        return goodsUptime;
    }

    public void setGoodsUptime(Date goodsUptime) {
        this.goodsUptime = goodsUptime;
    }

    public Date getGoodsDowntime() {
        return goodsDowntime;
    }

    public void setGoodsDowntime(Date goodsDowntime) {
        this.goodsDowntime = goodsDowntime;
    }

    public String getGoodsImageUrl() {
        return goodsImageUrl;
    }

    public void setGoodsImageUrl(String goodsImageUrl) {
        this.goodsImageUrl = goodsImageUrl;
    }
}
